﻿#include "orvbase.h"
#include "ui_orvbase.h"

#include "equipmentlist.h"
#include "requestlist.h"
#include "softwarelist.h"
#include "orvsettings.h"
#include "conclusionlist.h"
#include "filllist.h"

orvbase::orvbase(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::orvbase)
{
    ui->setupUi(this);
    orvSettings *mycfg;
    equipmentList *elist;
    requestList *rlist;
    softwareList *slist;
    conclusionList *clist;
    fillList *flist;

    mycfg=new orvSettings(ui->SettingsTab);
    elist=new equipmentList(ui->EquipmentTab);
    connect(mycfg,SIGNAL(settingsChanged()),elist,SLOT(updateList()));
    flist=new fillList(ui->FillTab);
    connect(mycfg,SIGNAL(settingsChanged()),flist,SLOT(updateList()));
    rlist=new requestList(ui->RequestTab);
    connect(mycfg,SIGNAL(settingsChanged()),rlist,SLOT(updateList()));
    slist=new softwareList(ui->SoftwareTab);
    connect(mycfg,SIGNAL(settingsChanged()),slist,SLOT(updateList()));
    clist=new conclusionList(ui->ConclusionTab);
    connect(mycfg,SIGNAL(settingsChanged()),clist,SLOT(updateList()));

    ui->EquipmentLayout->addWidget(elist);
    ui->FillLayout->addWidget(flist);
    ui->RequestLayout->addWidget(rlist);
    ui->softwareLayout->addWidget(slist);
    ui->SettingsLayout->addWidget(mycfg);
    ui->ConclusionLayout->addWidget(clist);
}

orvbase::~orvbase()
{
    delete ui;
}


